resources.json
The resources.json file holds all translations used in the applications. This file is generally places in the folder /src/locales/ within each project using i18next.
File structure
{
"en": {
"translation": {
[namespace]: {
[key]: [value]
}
}
},
"ga-IE": {
"translation": {
[namespace]: {
[key]: [value]
}
}
}
}
Terminology
| variable | description |
|---|---|
| namespace | Describes the component in which the text will be used |
| key | Describes a the purpose of the key or its string value |
| value | The string value of that key is referencing |
EXAMPLE
{
"en": {
"translation": {
"story_menu_view": {
"title": "Select a story"
}
}
},
"ga-IE": {
"translation": {
"story_menu_view": {
"title": "Roghnaigh scéal"
}
}
}
}